<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">

    <!-- Sidebar - Brand -->
    <a class="sidebar-brand d-flex align-items-center justify-content-center" href="#">
        <div class="sidebar-brand-icon rotate-n-15">
            <i class="fas fa-laugh-wink"></i>
        </div>
        <div class="sidebar-brand-text mx-3">[[${session.holder}]] <sup></sup></div>
    </a>
    <div class="sidebar-heading">
        Addons
    </div>
    <!-- Nav Item - Pages Collapse Menu -->
    <!--    <li class="nav-item">-->
    <!--        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" aria-expanded="true" aria-controls="collapsePages">-->
    <!--            <span>填写上传数据</span>-->
    <!--        </a>-->
    <!--        <div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">-->
    <!--            <div class="bg-white py-2 collapse-inner rounded">-->
    <!--                <a class="collapse-item" href="/user/submit_PDS_report">填写平顶山年检数据</a>-->
    <!--                <a class="collapse-item" href="/user/submit_SPT_report">填写省平台机械检测报告</a>-->
    <!--            </div>-->
    <!--        </div>-->
    <!--    </li>-->
    <li class="nav-item" th:if="${session.userId != 72 && session.userId != 73}" >
        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="true"
           aria-controls="collapseTwo">
            <span>管理检测报告数据(1)</span>
        </a>
        <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
            <div class="bg-white py-2 collapse-inner rounded">
                <a class="collapse-item" href="/user/submit_report">填写审核检测报告(1)</a>
                <a class="collapse-item" href="/user/view_save_report">查看已保存的报告(1)</a>
                <a class="collapse-item checkPassword" href="/user/view_report">查看检测报告进度(1)</a>
                <a class="collapse-item checkPassword" href="/user/print_report">下载检测报告进度(1)</a>
            </div>
        </div>
    </li>
    <li class="nav-item" >
        <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseThree" aria-expanded="true"
           aria-controls="collapseThree">
            <span>管理检测报告数据(2)</span>
        </a>
        <div id="collapseThree" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">

            <div class="bg-white py-2 collapse-inner rounded">
                <a class="collapse-item" href="/user/submit_report2">填写审核检测报告(2)</a>
                <a class="collapse-item" href="/user/view_save_report2">查看已保存的报告(2)</a>
                <a th:if="${session.userId != 72 && session.userId != 73}" class="collapse-item checkPassword" href="/user/view_report2">查看检测报告进度(2)</a>
            </div>
        </div>
    </li>
    <!-- Nav Item - Charts -->
    <li class="nav-item">
        <a class="nav-link" href="/user/search/vehicle">
            <span>检测过程查询页面</span></a>
    </li>

    <li th:if="${session.userId == 71}" class="nav-item">
        <a class="nav-link" href="/user/vehicle_table">
            <span>检测过程数据页面</span></a>
    </li>
    <!-- Divider -->
    <hr class="sidebar-divider d-none d-md-block">
    <!-- Sidebar Toggler (Sidebar) -->
    <div class="text-center d-none d-md-inline">
        <button class="rounded-circle border-0" id="sidebarToggle"></button>
    </div>

<!--    <script>-->
<!--        var cc = document.getElementsByClassName("checkPassword");-->
<!--        for (var i in cc) {-->
<!--            cc[i].onclick = checkSubmitPassword;-->
<!--        }-->
<!--        function checkSubmitPassword() {-->
<!--            var uid = localStorage.getItem("token");-->
<!--            if(uid == 44){-->
<!--                var password =  prompt("请输入口令：");-->
<!--                if(password != "12053783"){-->
<!--                    alert("口令有误!");-->
<!--                    return false;-->
<!--                }-->
<!--            }-->
<!--            return true;-->
<!--        }-->
<!--    </script>-->
</ul>
</body>
</html>